
#include "RayCastingGPU3Dscene.h" //fatal error C1189: #error :  gl.h included before glew.h

#include"GLUTSceneContainer.h"
#include "Scene.h"
#include "Image2Dscene.h"
#include "Image3Dscene.h"
#include "Image3Dscene2.h"
#include "bmpreader.h"
#include "rawreader.h"
#include "Texture3Dscene.h"
#include "RayCasting3Dscene.h"
#include "Texture2Dscene.h"
#include "RayCasting3Dscene2.h"

#include "VolumeData.h" // 数据
#include "Cube3Dscene.h"
//#include "VolumeTextureMapper3D.h"
//#include "RawDataProcessor.h"

#pragma comment(lib,"Opengl32.lib")
#pragma comment(lib,"Glu32.lib")
#pragma comment(lib,"glut32.lib")
#pragma comment(lib,"glew32.lib")



//有了容器类GLUTSceneContainer，main函数就变得简单了（如果你看过其他使用glut进行编程的例子的话）
int main(int argc,char**argv)
{
	glutInit(&argc,argv);

	char readPath[]= "d:\\head256256109";//"D:\\1111111.bmp"; 
	rawreader *pReader1 = new rawreader;
	pReader1->ReadFile(readPath,256,256,109);
	//pReader1->Update();


	////CRawDataProcessor *pReader = new CRawDataProcessor;
	////pReader->ReadFile(readPath,256,256,109);

	////VolumeData* data=new VolumeData;
	////data->ReadStructuredFile("d:/cthead.dat"); //读一个数据，这是需要事先准备好的

	//Texture2Dscene* scene=new Texture2Dscene;/// new一个Scene
	//Cube3Dscene* scene=new Cube3Dscene;/// new一个Scene
	////scene->SetBackGroundColor(0.5f,0.5f,0.5f);
	//scene->SetData(pReader1);



	//char readPath[]="D:\\1111111.bmp";  	  
	//bmpreader *pReader = new bmpreader;
	//pReader->readBmp(readPath);

	//Image3Dscene2* scene=new Image3Dscene2;/// new一个Scene
	//scene->SetData(pReader);


	RayCasting3Dscene2 *scene=new RayCasting3Dscene2;

	GLUTSceneContainer*mainWindow = GLUTSceneContainer::GetMainWindow();
	mainWindow->SetTitle("Test Window");
	mainWindow->SetScene(scene); ///加入到容器mainWindow当中
	mainWindow->Create(100,100);
}